﻿using System;
using libtcod;

namespace RL
{
    public class Terrain : Entity, IRenderable
    {
        private TerrainType terrainType;

        public Terrain(Point position, char pic, TerrainType terrain, int terrainHeight) : base(position, pic, TCODColor.white)
        {
            terrainType = terrain;
            switch (terrainType)
            {
                case (TerrainType.Water):
                    Color = new TCODColor(0, 0, terrainHeight);
                    break;
                case (TerrainType.Grassland):
                    Color = new TCODColor(0, terrainHeight, 0);
                    break;
                case (TerrainType.Mountain):
                    Color = new TCODColor(terrainHeight, terrainHeight, terrainHeight);
                    break;
            }
        }

        public TerrainType Type {get { return terrainType; }}
    }
}